<template>
  <div class="fu">
    <div class="top">
      <slot name="biaoti"></slot>
      <span>全部(9)</span>
    </div>
    <div class="con">
      <div class="zi" v-for="(v,i) in data" :key="i">
        <img :src="v.img" alt="" />
        <p>{{ v.title | wenzi }}</p>
        <span>购票</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  computed: {
    newmo() {
      return this.$store.state.newmovie;
    },
  },
  filters: {
    wenzi(val) {
      if (val.length > 6) {
        return val.substr(0, 5) + "...";
      } else {
        return val;
      }
    },
  },
  props:["data"]
};
</script>

<style scoped>
.fu {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
}
img {
  width: 100px;
  height: 140px;
}

.top {
  width: 93%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 0.5rem;
  background-color: #fff;
}
.con {
  width: 100%;
  overflow: auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
}
.con img {
  width: 1.05rem;
  height: 1.5rem;
}
.zi {
  width: 24%;
  height: 2.4rem;
  flex-shrink: 0;
  margin: 0 0.1rem;
}
.zi p {
  margin-bottom: 0.2rem;
  /* margin-left: 0.15rem; */
  margin-top: 0.1rem;
  font-size: 0.14rem;
}
.zi span {
  padding: 0.05rem;
  font-size: 0.13rem;
  color: #c03131;
  border: 1px solid #c03131;
  margin-left: 0.15rem;
}
</style>